package main

import (
	"fmt"
	"os"
)

func main() {
	fileObj, err := os.Open("./test.txt") //获取文件指针
	if err != nil {
		fmt.Printf("open file failed,err:%v\n", err)
		return
	}
	fmt.Printf("%T\n", fileObj)
	fs, _ := fileObj.Stat() //获取文件对象的详细信息
	fmt.Println(fs.Name())
	fmt.Println(fs.Size())

}
